clear all;
close all;
Qk=[0;0];u2=0;
alpha=3;beta=9;

T=0.001;
for k=1:1:10000
    time(k)=k*T;
    if time(k)<1
        fit=0.2*k*T;
    else
        fit=-0.2*k*T+0.4;
    end
    
    x(k)=Qk(1);y(k)=Qk(2);

    tSpan=[0 T];
   
    [tt,Qq] = ode45(@(t,x) plant(t,x,k),tSpan,Qk);
    Qk = Qq(length(Qq),:);


    
end

figure(1);
plot(time,x,'k',time,y,'r','linewidth',2);
xlabel('time(s)');ylabel('x1');